import sys
from Ui_main import *
from PyQt4 import *
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4.Qwt5.qplt import *
from Numeric import *
from numpy import *
from tab1 import *


class Magnet(QtGui.QMainWindow):
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_mainWin()
        self.ui.setupUi(self)
       
        
        
        
        self.connect(self.ui.btnK1, QtCore.SIGNAL("clicked()"),  tab1.OtvorSubor)
        self.connect(self.ui.btnK2, QtCore.SIGNAL("clicked()"),  self.OtvorSuborK2)
        self.connect(self.ui.btnK3, QtCore.SIGNAL("clicked()"),  self.OtvorSuborK3)
        self.connect(self.ui.btnK4, QtCore.SIGNAL("clicked()"),  self.OtvorSuborK4)
        
        self.ui.tabMag.setColumnCount(4)
        
        self.ui.tabMag.setHorizontalHeaderItem(0, QTableWidgetItem('K1'))
        self.ui.tabMag.setHorizontalHeaderItem(1, QTableWidgetItem('K2'))
        self.ui.tabMag.setHorizontalHeaderItem(2, QTableWidgetItem('K3'))
        self.ui.tabMag.setHorizontalHeaderItem(3, QTableWidgetItem('K4'))
        
     
    
